package cn._2dland.comment.locator
{
	import cn._2dland.utils.CommentUtils;

	public class CommentLocatorFactory
	{
		public function CommentLocatorFactory() {}
		
		public static function createCommentLocator(mode:int):CommentLocator {
			var locator:CommentLocator = null;

			switch(mode) {
				case CommentUtils.MODE_CUSTOM:
					locator = new CustomLocator();
					break;
				case CommentUtils.MODE_FIXED_TOP:
					locator = new FixedTopLocator();
					break;
				case CommentUtils.MODE_FIXED_BOTTOM:
					locator = new FixedBottomLocator();
					break;
				case CommentUtils.MODE_DRIFT_UP:
					locator = new DriftUpLocator();
					break;
				case CommentUtils.MODE_DRIFT_DOWN:
					locator = new DriftDownLocator();
					break;
				case CommentUtils.MODE_DRIFT_LEFT:
					locator = new DriftLeftLocator();
					break;
				case CommentUtils.MODE_DRIFT_RIGHT:
					locator = new DriftRightLocator();
					break;
				default:
					locator = new CommentLocator();
					break;
			}

			return locator;
		}
	}
}